﻿using System;
using System.Collections.Generic;
 
using System.Text;
using GGSharp.Structures;

namespace GGSharp.Packets
{
    public class NotifyLastPacket : HeaderPacket
    {
        public List<Structures.NotifyStruct> Contacts = new List<GGSharp.Structures.NotifyStruct>();

        public NotifyLastPacket()
        {
            this.Type = PacketType.GG_NOTIFY_LAST;
        }

        public override void Write(System.IO.BinaryWriter writer)
        {
            for (int i = 0; i < Contacts.Count; i++)
                this.Length += Contacts[i].Length;

            base.Write(writer);

            for (int i = 0; i < Contacts.Count; i++)
            {
                NotifyStruct notify = Contacts[i];
                notify.Write(writer);
            }
        }
    }
}
